<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<title>展开语法</title>
	</head>
	<body>
		<script type="text/javascript" >
			let obj = {a:1,b:2,c:3}
			let arr = [1,3,5,7,9]

			console.log(arr) // [1,3,5,7,9]
			console.log(...arr) // 1 3 5 7 9 --- ...可以展开一个数组的
			//console.log(...obj) //改行代码报错

			const obj2 = {...obj} //复制(浅)一个obj赋值给obj2
			console.log(obj2 === obj)

			const obj3 = {...obj,b:200} //复制(浅)一个obj，且修改b为200，再赋值给obj3
			console.log(obj3)

		</script>
	</body>
</html>